package com.zj.study.utils.util;

import java.io.Serializable;

/**
 * <p>字符串工具类<p/>
 *
 * @author 赵赳
 * @since 2021/10/21 15:21
 */
public class StringUtils {


  /**
   * 判断字符串是否为空，为空返回false
   * @param str 目标字符串
   * @return 结果
   */
  public static boolean notBlank(String str) {
    return !str.isBlank();
  }

  public static boolean isEmpty(String str) {
    return str.isEmpty();
  }

  public static String join(String sep, Serializable... strings) {
    if (strings.length == 0) {
      return "";
    } else {
      StringBuilder builder = new StringBuilder();
      int count = 0;
      Serializable[] var4 = strings;
      int var5 = strings.length;

      for(int var6 = 0; var6 < var5; ++var6) {
        Serializable string = var4[var6];
        if (string != null) {
          builder.append(string).append(sep);
          ++count;
        }
      }

      if (count > 0) {
        builder.delete(builder.length() - sep.length(), builder.length());
      }

      return builder.toString();
    }
  }
}
